package com.jk.dmuserprovider.controller;
import  com.jk.dmcommon.LybEntity.UserEntity;
/*
import com.jk.dmcommon.entity.UserEntity;
*/
import com.jk.dmuserprovider.service.PhoneService;
import org.hibernate.validator.constraints.ParameterScriptAssert;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @描述
 * @参数 $
 * @返回值 $
 * @创建人 lgf
 * @创建时间 $
 * @修改人和其它信息
 */
@RestController
@RequestMapping("phone")
public class PhoneController {
    @Resource
    private PhoneService phoneService;

    @RequestMapping("findPhone")
    public Object findPhone(Integer userId){
        return phoneService.findPhone(userId);
    }

    @PostMapping("update")
    public void update(@RequestBody UserEntity user){
        phoneService.update(user);
    }

    @PostMapping("updatePhone")
    public void updatePhone(@RequestBody UserEntity user){
        phoneService.updatePhone(user);
    }

    @PostMapping("addyou")
    public void addyou(@RequestBody UserEntity user){
        phoneService.addyou(user);
    }


    @PostMapping("adddcard")
    public Object adddcard(@RequestBody UserEntity user){
        return phoneService.adddcard(user);
    }





}
